package edu.uclmgmu.bacteriosec.aspects.java.io.PipedOutputStream;

import java.io.PipedOutputStream;

import edu.uclmgmu.bacteriosec.aspects.common.Store;

privileged aspect PipedOutputStream_CountCalls {

	void around(java.io.PipedOutputStream caller, byte[] a, int b, int c) : target(caller) && args(a, b, c) &&  call(* PipedOutputStream.write(byte[], int, int)) {
		int counter=Store.get(thisJoinPointStaticPart.getSignature());
		Store.updateNumberOfCalls(thisJoinPointStaticPart.getSignature(), counter++);
		Store.put(thisJoinPointStaticPart.getSignature(), counter);
		proceed(caller, a, b, c);
	}

}
